@echo off
echo Stopping services...

REM Find and kill the process for the client API (port 8080)
for /f "tokens=5" %%a in ('netstat -aon ^| find ":8080" ^| find "LISTENING"') do (
    echo Stopping Client API process with PID %%a
    taskkill /F /PID %%a
)

REM Find and kill the process for the MCP server (port 8000)
for /f "tokens=5" %%a in ('netstat -aon ^| find ":8000" ^| find "LISTENING"') do (
    echo Stopping MCP Server process with PID %%a
    taskkill /F /PID %%a
)

echo All services stopped.